/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Entity(TableCnName = "工单激活Main",TableName = "V_PLAN_WORK_ORDER",DetailTable =  new Type[] { typeof(PLAN_WORK_ORDER_EQU)},DetailTableCnName = "PLAN_WORK_ORDER_EQU")]
    public partial class V_PLAN_WORK_ORDER:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Key]
       [Display(Name ="Order_Id")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string Order_Id { get; set; }

       /// <summary>
       ///工单
       /// </summary>
       [Display(Name ="工单")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string OrderCode { get; set; }

       /// <summary>
       ///产品
       /// </summary>
       [Display(Name ="产品")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProductId { get; set; }

       /// <summary>
       ///工作中心
       /// </summary>
       [Display(Name ="工作中心")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string WorkCenterId { get; set; }

       /// <summary>
       ///产品BOM
       /// </summary>
       [Display(Name ="产品BOM")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProductBOMId { get; set; }

       /// <summary>
       ///工艺路线
       /// </summary>
       [Display(Name ="工艺路线")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProcessRouteId { get; set; }

       /// <summary>
       ///工单类型
       /// </summary>
       [Display(Name ="工单类型")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string OrderType { get; set; }

       /// <summary>
       ///工单数量
       /// </summary>
       [Display(Name ="工单数量")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? OrderQuantity { get; set; }

       /// <summary>
       ///计划开始时间
       /// </summary>
       [Display(Name ="计划开始时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? PlanStart { get; set; }

       /// <summary>
       ///计划结束时间
       /// </summary>
       [Display(Name ="计划结束时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? PlanEnd { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="Description")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string Description { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="work_order_number")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string work_order_number { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="workpiece_id")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? workpiece_id { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="priority")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? priority { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="material_id")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? material_id { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="processing_grade")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? processing_grade { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="length")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? length { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="width")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? width { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="height")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? height { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="measure_number")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string measure_number { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="centring_number")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string centring_number { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="make_level_number")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string make_level_number { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="accuracy")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? accuracy { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="process_Status")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? process_Status { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="Status")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string Status { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="IsActivation")]
       [MaxLength(2)]
       [Column(TypeName="nvarchar(2)")]
       [Editable(true)]
       public string IsActivation { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="CreateBy")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string CreateBy { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="CreateOn")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? CreateOn { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="UpdateBy")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string UpdateBy { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="LastUpdateOn")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? LastUpdateOn { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="IsDeleted")]
       [Column(TypeName="bit")]
       [Editable(true)]
       public bool? IsDeleted { get; set; }

       [Display(Name ="PLAN_WORK_ORDER_EQU")]
       [ForeignKey("Order_Id")]
       public List<PLAN_WORK_ORDER_EQU> PLAN_WORK_ORDER_EQU { get; set; }

    }
}